package com.lc202406;

import java.util.List;

public class Solution2828 {
    public boolean isAcronym1(List<String> words, String s) {
        String res = "";
        for (String word : words) {
            res += word.charAt(0);
        }
        return res.equals(s);
    }

    public boolean isAcronym(List<String> words, String s) {
        int length = s.length();
        if (length != words.size()) {
            return false;
        }
        for (int i = 0; i < length; i++) {
            if (s.charAt(i) != words.get(i).charAt(0)) {
                return false;
            }
        }
        return true;
    }
}
